package com.pug.service;

import com.pug.domain.Account;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

/**
 * @author panghu
 * @version 1.0.0
 * @createTime 2022年08月13日 00:32:00
 * @Description
 */
@Service
@Slf4j
@DubboService(version = "2.0") // 暴露服务-作为生产者
public class PayServiceImpl implements PayService {

    /**
     * 根据用户id查询用户余额
     *
     * @param userId
     * @return
     */
    @Override
    public Account getAccountInfo(Long userId) {
        Account account = new Account();
        account.setUserId(userId);
        account.setUsername("yykk");
        account.setPaydesc("银联支付");
        account.setUserAccount(new BigDecimal("1000021"));
        return account;
    }

}
